<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>编辑花卉</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/5.2.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
    <div class="container mt-4">
        <h2>编辑花卉</h2>
        <form action="${pageContext.request.contextPath}/flower/edit" method="post">
            <input type="hidden" name="id" value="${flower.id}">
            <div class="mb-3">
                <label for="name" class="form-label">名称</label>
                <input type="text" class="form-control" id="name" name="name" value="${flower.name}" required>
            </div>
            <div class="mb-3">
                <label for="price" class="form-label">价格</label>
                <input type="number" step="0.01" class="form-control" id="price" name="price" value="${flower.price}" required>
            </div>
            <div class="mb-3">
                <label for="stock" class="form-label">库存</label>
                <input type="number" class="form-control" id="stock" name="stock" value="${flower.stock}" required>
            </div>
            <div class="mb-3">
                <label for="categoryId" class="form-label">分类ID</label>
                <input type="number" class="form-control" id="categoryId" name="categoryId" value="${flower.categoryId}" required>
            </div>
            <div class="mb-3">
                <label for="description" class="form-label">描述</label>
                <textarea class="form-control" id="description" name="description" rows="3">${flower.description}</textarea>
            </div>
            <div class="mb-3">
                <label for="imageUrl" class="form-label">图片URL</label>
                <input type="text" class="form-control" id="imageUrl" name="imageUrl" value="${flower.imageUrl}">
            </div>
            <button type="submit" class="btn btn-primary">更新</button>
            <a href="${pageContext.request.contextPath}/flower" class="btn btn-secondary">返回</a>
        </form>
    </div>
</body>
</html> 